<template>
	<view>
		<!-- <free-nav-bar title="扫一扫" showBack :showCloseRigh="true"></free-nav-bar> -->
		<mumu-get-qrcode @success='qrcodeSucess' @error="qrcodeError"></mumu-get-qrcode>

	</view>
</template>

<script>
	import freeNavBar from "@/components/free-ui/free-nav-bar.vue";
	import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue'

	export default {
		components: {
			freeNavBar,
			mumuGetQrcode
		},
		data() {
			return {
				showScan: false,
			};
		},

		
		methods: {
			qrcodeSucess(data) {
				 let id = data;
				uni.navigateTo({
				  url: `/pages/tabbar/index/queryDetail?id=${id}`,
				});
			},
			qrcodeError(err) {
				uni.showModal({
					title: '摄像头授权失败',
					content: '摄像头授权失败，请检测当前浏览器是否有摄像头权限。',
					success: () => {
						uni.navigateBack({})
					}
				})
			}
		}
	}
</script>

<style>
</style>